import request from "@/utils/request";

/**
 * 获取页面数据
 * @param pageNum 页码
 * @param pageSize 页面大小
 */
export const getCommodities = (pageNum , pageSize) => {
    return request.get(`/book/${pageNum}/${pageSize}`)
}

/**
 * 获取购物车数量
 */
export const getCartCount = () => {
    return request.get('/shopCar/cartList')
}

/**
 * 根据分类id获取对应的数据信息
 * @param categoryId 分类id
 */
export const getCommoditiesByCategoryId = (categoryId) => {
    return request.get(`/book/findByCategory/${categoryId}`)
}
